package com.business.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 商机表
 * </p>
 *
 * @author rick
 * @since 2022-12-13 11:23:15
 */
@Getter
@Setter
@TableName("wk_crm_business")
@ApiModel(value = "CrmBusiness对象", description = "商机表")
public class CrmBusiness implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "business_id", type = IdType.AUTO)
    private Integer businessId;

    @ApiModelProperty("商机状态组")
    @TableField("type_id")
    private Integer typeId;

    @ApiModelProperty("销售阶段")
    @TableField("status_id")
    private Integer statusId;

    @ApiModelProperty("下次联系时间")
    @TableField("next_time")
    private LocalDateTime nextTime;

    @ApiModelProperty("客户ID")
    @TableField("customer_id")
    private Integer customerId;

    @ApiModelProperty("首要联系人ID")
    @TableField("contacts_id")
    private Integer contactsId;

    @ApiModelProperty("预计成交日期")
    @TableField("deal_date")
    private LocalDateTime dealDate;

    @ApiModelProperty("商机名称")
    @TableField("business_name")
    private String businessName;

    @ApiModelProperty("商机金额")
    @TableField("money")
    private BigDecimal money;

    @ApiModelProperty("整单折扣")
    @TableField("discount_rate")
    private BigDecimal discountRate;

    @ApiModelProperty("产品总金额")
    @TableField("total_price")
    private BigDecimal totalPrice;

    @ApiModelProperty("备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty("创建人ID")
    @TableField("create_user_id")
    private Long createUserId;

    @ApiModelProperty("负责人ID")
    @TableField("owner_user_id")
    private Long ownerUserId;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty("批次 比如附件批次")
    @TableField("batch_id")
    private String batchId;

    @ApiModelProperty("只读权限")
    @TableField("ro_user_id")
    private String roUserId;

    @ApiModelProperty("读写权限")
    @TableField("rw_user_id")
    private String rwUserId;

    @ApiModelProperty("1赢单2输单3无效")
    @TableField("is_end")
    private Integer isEnd;

    @TableField("status_remark")
    private String statusRemark;

    @ApiModelProperty("1正常 3  删除")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("最后跟进时间")
    @TableField("last_time")
    private LocalDateTime lastTime;

    @ApiModelProperty("0 未跟进 1 已跟进")
    @TableField("followup")
    private Integer followup;


}
